package com.ruoyi.labmanage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labmanage.mapper.LabusageMapper;
import com.ruoyi.labmanage.domain.Labusage;
import com.ruoyi.labmanage.service.ILabusageService;

/**
 * 实验室使用明细Service业务层处理
 * 
 * @author lh
 * @date 2025-01-12
 */
@Service
public class LabusageServiceImpl implements ILabusageService 
{
    @Autowired
    private LabusageMapper labusageMapper;

    /**
     * 查询实验室使用明细
     * 
     * @param usageId 实验室使用明细主键
     * @return 实验室使用明细
     */
    @Override
    public Labusage selectLabusageByUsageId(Long usageId)
    {
        return labusageMapper.selectLabusageByUsageId(usageId);
    }

    /**
     * 查询实验室使用明细列表
     * 
     * @param labusage 实验室使用明细
     * @return 实验室使用明细
     */
    @Override
    public List<Labusage> selectLabusageList(Labusage labusage)
    {
        return labusageMapper.selectLabusageList(labusage);
    }

    /**
     * 新增实验室使用明细
     * 
     * @param labusage 实验室使用明细
     * @return 结果
     */
    @Override
    public int insertLabusage(Labusage labusage)
    {
        return labusageMapper.insertLabusage(labusage);
    }

    /**
     * 修改实验室使用明细
     * 
     * @param labusage 实验室使用明细
     * @return 结果
     */
    @Override
    public int updateLabusage(Labusage labusage)
    {
        return labusageMapper.updateLabusage(labusage);
    }

    /**
     * 批量删除实验室使用明细
     * 
     * @param usageIds 需要删除的实验室使用明细主键
     * @return 结果
     */
    @Override
    public int deleteLabusageByUsageIds(Long[] usageIds)
    {
        return labusageMapper.deleteLabusageByUsageIds(usageIds);
    }

    /**
     * 删除实验室使用明细信息
     * 
     * @param usageId 实验室使用明细主键
     * @return 结果
     */
    @Override
    public int deleteLabusageByUsageId(Long usageId)
    {
        return labusageMapper.deleteLabusageByUsageId(usageId);
    }
}
